package com.kylin.common.poi.configure;

import com.kylin.common.poi.excel.handler.ExcelDictService;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.annotation.Order;

import java.util.HashMap;
import java.util.Map;

/**
 * POI配置类
 * @author wuhao
 * @since 2.5.0 - 2021/12/10
 */
@Configuration
@Order(1)
public class DefaultPoiConfigure {

    /**
     * 字典导入导出处理类
     * @return
     * @author wuhao
     * @since 2.2.3 - 2021/12/11
     */
    @Bean
    @ConditionalOnMissingBean
    public ExcelDictService excelDictService()
    {
        return new ExcelDictServiceImpl();
    }


    public class ExcelDictServiceImpl implements ExcelDictService {

        @Override
        public Map<String, Object> toNameMap(String dict) {
            return new HashMap<>();
        }

        @Override
        public Map<String, Object> toValueMap(String dict) {
            return new HashMap<>();
        }
    }
}
